<!DOCTYPE html>
<html lang="zh-CN">
    <link rel="stylesheet" href="./index4.css">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>键盘焦点与鼠标悬停</title>
    <style>
        input:focus {
            background-color: aquamarine;
            color: blueviolet;
            outline: 0;
        }
        input {
            height: 38px;
           position: absolute;
           top: 20%;
           left: 10%;
        }
        .photo {
            width: 288px;
            height: 512px;
            background-image: url(./变化1.jpg);
            background-repeat: no-repeat;
            background-size: cover;
            margin: 30px auto;
            position: relative;
            
        }
        .photo1 {
            width: 288px;
            height: 512px;
            background-image: url(./变化2.jpg);
            background-repeat: no-repeat;
            background-size: cover;
            margin: 0px auto;
            opacity: 0;
            position: absolute;
        }
        .photo:hover .photo1 {
           opacity: 1;
        }
        .photo1{
            transition: 0.7s linear all;
        }
        html, body {
            background-image: url(https://p.qqan.com/up/2020-10/16030984182548078.jpg) ;
        } 
        .top-nav {
            background-color: rgba(100, 148, 237, 0.283);
        }
        .next a {
            color: black;
        }
    </style>
</head>
<body>
    <div class="top-nav">
        <ul>
            <li><a href="./1css样式二.html">css样式二</a></li>
            <li><a href="./浮动练习.html">浮动与定位</a></li>
            <li><a target="_blank" href="./字体图标练习.html">字体图标</a></li>
            <li><a href="./立方体动画.html">立方体动画</a></li>
        </ul>
        </div>
    <input type="text" placeholder="我是输入框">
    <div class="photo">
        <div class="photo1"></div>
    </div>
    <div class="next"><a href="./bilibili悬停.html">点我去bili悬停</a></div>
</body>
</html>